package cn.edu.ctbu.dp01.dao;

import cn.edu.ctbu.dp01.entity.Teacher;
import org.hibernate.query.Page;
import org.springframework.data.domain.Example;
import org.springframework.data.jpa.repository.JpaRepository;

import java.awt.print.Pageable;
import java.util.List;

public interface TeacherRepository extends JpaRepository<Teacher, Integer> {
    /**
     * 按名字查询
     * @param name
     * @return
     */
    List<Teacher> findByNameLike(String name);

    /**
     * 按名字和密码进行查询
     * @param name
     * @param password
     * @return
     */
    List<Teacher> findByNameAndPassword(String name, String password);

    public List<Teacher> findByTno(String tno);

//    Page findAll(Example<Teacher> example, Pageable pageable);
//
//    Page findAll(Pageable pageable);
}
